package com.tdp.neo4j;

public class KeyOfRelation {
	
	private long startNode;
	private long endNode;

	public KeyOfRelation() {
	}

	public KeyOfRelation(long startNode, long endNode) {
		this.startNode = startNode;
		this.endNode = endNode;
	}

	public long getStartNode() {
		return startNode;
	}

	public void setStartNode(long startNode) {
		this.startNode = startNode;
	}

	public long getEndNode() {
		return endNode;
	}

	public void setEndNode(long endNode) {
		this.endNode = endNode;
	}

	@Override
	public String toString() {
		return "KeyOfRelation [startNode=" + startNode + ", endNode=" + endNode
		        + "]";
	}

	@Override
    public int hashCode() {
	    final int prime = 31;
	    int result = 1;
	    result = prime * result + (int) (endNode ^ (endNode >>> 32));
	    result = prime * result + (int) (startNode ^ (startNode >>> 32));
	    return result;
    }

	@Override
    public boolean equals(Object obj) {
	    if (this == obj)
		    return true;
	    if (obj == null)
		    return false;
	    if (getClass() != obj.getClass())
		    return false;
	    KeyOfRelation other = (KeyOfRelation) obj;
	    if (endNode != other.endNode)
		    return false;
	    if (startNode != other.startNode)
		    return false;
	    return true;
    }

}
